package com.woniuxy.ticketcinema.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.woniuxy.ticketcinema.checkoutGroup.TicketCinemaIdNotNull;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @ClassName TicketCinema
 * @Description 电影院表
 * @Author zx
 * @Date 2021-02-24 19:02:59
 * @Version 1.0
 */

/**
 * @ApiModelProperty()用于方法，字段； 表示对model属性的说明或者数据操作更改
 * value–字段说明
 * name–重写属性名字
 * dataType–重写属性类型
 * required–是否必填
 * example–举例说明
 * hidden–隐藏
 */
@ApiModel(value = "com-woniuxy-tickecinema-entity-TicketCinema")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class TicketCinema implements Serializable {

    @TableId(type = IdType.AUTO)
    @NotNull(message = "id不能为空", groups = TicketCinemaIdNotNull.class)
    @ApiModelProperty(value = "id", example = "1", hidden = true)  //隐藏
    private Integer id;

    @NotNull(message = "影院名不允许为空") //参数格式
    @ApiModelProperty(value = "name", example = "蜗牛影院")
    private String name;

    @NotNull(message = "影院地址不允许为空")
    @ApiModelProperty(value = "address", example = "孵化园")
    private String address;

    //    @Valid    //级联校验
    @NotNull(message = "联系电话不允许为空")

    @ApiModelProperty(value = "telphone", example = "15707405510")
    private String telphone;
}
